package org.karelun.gef.model;

import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.jface.resource.FontRegistry;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.graphics.Font;

public class AttributeModel extends BaseClassModel {

	private static final long serialVersionUID = 1L;

	private static int i = 0;

	private String attribute = "attribute"; //$NON-NLS-1$

	public AttributeModel() {
		super();
		if (i > 0)
			attribute = "attribute" + String.valueOf(i); //$NON-NLS-1$
		setText(attribute);
		i++;
		setLocation(5,5);
		setSize(new Dimension(10, 20));
		
		String id=String.valueOf(System.currentTimeMillis());
        setId(id);
        
        FontRegistry fontRegistry = JFaceResources.getFontRegistry();
        Font font = fontRegistry.getBold(JFaceResources.DEFAULT_FONT);
        setFontData(font.getFontData()[0]);
	}

}
